StatCounteX 2.0 Report a Bug | Recommend a feature | Ask a question | Submit a site

Introduction

StatCountex 2.0 is a statistics reporting application written in pure ASP.

It collects data from the visitors of your site and stores it into an Access database. You may view the analysis results using the Reports page.

Being a lot more powerful than a simple page counter, StatCounteX features detailed access statistics using ASP and an Access database. You may read the article Statisticus for more advanced discussions on site statistics.

By executing SQL queries on the collected data, StatCounteX generates the following reports:

Individual Statistics:
» Page Views,
» Browser Type,
» Operating System,
» Screen Resolution,
» Color Depth,
» Visitor IP's,
» Referer Information

Detailed Page View Statistics:
» Total pageviews for entire site,
» Pageviews for each page,
» Pageviews for a specific time period (daily, weekly, etc.).

Detailed Visitor Statistics:
» Total number of unique visitors for entire site,
» Visitors for each page,
» Visitors for a specific time period,

How the StatCounteX WorX?

The basic idea behind StatCounteX is to use an image as a counter. You will add the counter code provided into the files which you want to count.

StatCounteX 2.0 features Data Normalization to minimize the storage required to save the collected data in the database. For more information on Data Normalization, read the Part V of the Statisticus article.

Installation Guide

1. Database Location

Open config.asp, find the line:

cDBStats = "stats.mdb"

This line specifies the location of your database. You should place your database file in a secure folder. "Secure" means the folder permissions should be set such that the ASP files will have full read/write rights whereas the visitors are not allowed to access. (Not an SSL secure folder which is required for secure transactions.)

For example, if your secure folder is /securedata, change this line to:

cDBStats = "/securedata/stats.mdb"

If you keep the file in the same folder with StatCounteX files, StatCounteX works anyway but the visitors who know (or guess) the path and name of your Mdb file will be able to download it directly.

(Actually, this warning applies to all of your Mdb files.)

2. StatCounteX folder

Create a folder where you will use StatCounteX, by default it's "statcountex" folder under the root folder. (/statcountex).

If you don't want to use /statcountex folder, make the following modifications:

Open countcode.txt, find the line:

var file='/statcountex/count.asp';

For example, if your StatCounteX folder is /tools/counter, change this line to:

var file='/tools/counter/count.asp';

Note that the location starts from the root folder /.

3. Files to be counted

After making the modifications (if any), open countcode.txt, select all the contents and paste them into the place in your html code where the counter image will be displayed.

(See issues and considerations if you intend to make more modifications.)

4. Configuration Switches

(See config.asp for more explanations.)

bRefThisServer = False

Count your own server as referer?

bStripPathParameters = True

Strip off the parameters from the path name?

bStripPathProtocol = True

Strip off the protocol from the path name?

bStripRefParameters = True

Strip off the parameters from the referer name?

bStripRefProtocol = True

Strip off the protocol from the referer name?

bStripRefFile = False

Strip off the path and file name from the referer name?

Issues and Considerations

Counter Image
You may want to change the counter image. You need to complete the following steps if you want to use a different image:

1. Select an image to put on all pages, such as your logo. You may use an existing image on your pages too. You'll need the location, width and height of this image.

2. Open countcode.txt file; Find the line beginning with "document.write".

This line generates the "img" tag. Replace the width and height with your own image's width and height. (You may use width=0 and height=0 if you dont want to display the image)

3. Open config.asp file; Find the line:

const sImageLocation = "icostatcountex.gif"

This line specifies the location of the counter image. You may use a relative path to count.asp file.

If the counter image and count.asp file are in the same folder, you dont need to specify a path.

NOTE: You should modify the img tag in "noscript" for browsers that doesn't run Javascript.


Visit 2eNetWorX for more OpenSource VB and ASP Projects. StatCounteX